﻿package com.snakedickgames.common.rendering2D 
{
    import com.pblabs.engine.debug.Logger;
    import com.pblabs.rendering2D.DisplayObjectRenderer;
    import com.pblabs.rendering2D.DisplayObjectSceneLayer;

    
    public class YDepthOrderSceneLayer extends DisplayObjectSceneLayer
    {        
        public function YDepthOrderSceneLayer() 
        {
            super();
    
            drawOrderFunction = orderByYFunction;
        }
        
        static public function orderByYFunction(a:DisplayObjectRenderer, b:DisplayObjectRenderer):int
        {
            return a.y - b.y;
        }
    }

}